from typing import Optional
from pydantic import BaseModel

class WorkAreaSettingBase(BaseModel):
    WorkAreaId: int
    SettingKey: str  # 设置项键名
    SettingValue: str  # 设置项值
    Description: Optional[str] = None
    Status: str = "active"  # active/inactive

    class Config:
        from_attributes = True

class WorkAreaSettingCreate(BaseModel):
    WorkAreaId: int
    SettingKey: str
    SettingValue: str
    Description: Optional[str] = None

class WorkAreaSettingUpdate(BaseModel):
    SettingValue: Optional[str] = None
    Description: Optional[str] = None
    Status: Optional[str] = None

class WorkAreaSetting(WorkAreaSettingBase):
    ID: int

    class Config:
        from_attributes = True 